/* 
 * File:   HSKCodification.cpp
 * Author: marcio
 * 
 * Created on 30 de Agosto de 2013, 15:18
 */

#include "HSKCodification.h"

#define GENES 2

HSKCodification::HSKCodification() {
    cromo = new double[GENES];
}

HSKCodification::~HSKCodification() {
    delete cromo;
}

void HSKCodification::Copy(Problem *prob, Codification *source) throw (exception) {
    HSKCodification* codif = dynamic_cast<HSKCodification*> (source);

    for (int i = 0; i < GENES; i++) {
        this->cromo[i] = codif->cromo[i];
    }
}

Codification* HSKCodification::New(Problem *prob) throw (exception) {
    return new HSKCodification();
}
